var obj = new Proxy([], {
  get: function (target, propKey, receiver) {
    console.log(`getting ${propKey}!`);
    return Reflect.get(target, propKey, receiver);
  },
  set: function (...arg) {
    let [target, propKey, value, receiver] = arg;
    console.log(`setting ${propKey} of ${value}!`);
    return Reflect.set(target, propKey, value, receiver);
  },
  test() { }
});

obj['name'] = 'foo';
console.log(obj.name);
